cmake_minimum_required(VERSION 2.8)

set(CMAKE_TOOLCHAIN_FILE "cmake/ArduinoToolchain.cmake")

set(ARDUINO_AVRDUDE_PROGRAM     "/usr/bin/avrdude")
set(ARDUINO_AVRDUDE_CONFIG_PATH "/etc/avrdude.conf")
set(ARDUINO_DEFAULT_BOARD       "leonardo")
#set(ARDUINO_DEFAULT_BOARD       "uno")
set(ARDUINO_DEFAULT_PORT        "/dev/ttyACM0")
#set(ARDUINO_DEFAULT_PORT        "/dev/ttyACM1")

include_directories(
  "${CMAKE_SOURCE_DIR}/include"
  "${ARDUINO_SDK_PATH}/hardware/arduino/cores"
  "${ARDUINO_SDK_PATH}/libraries"
  "/usr/avr/include"
)

add_definitions(-Wno-attributes -D__PROG_TYPES_COMPAT__)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

add_subdirectory("src")
